package syan.sql.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import syan.sql.Dao.User;
import syan.sql.service.DivisionService;

import javax.servlet.http.HttpServletResponse;

/**
 * @author CHENTAIWEN
 * @create 2022/9/23 13:29
 */
@RestController
public class SqlController {

    @Autowired
    private DivisionService divisionService;

    @PostMapping("demo")
    public void demo1(@RequestBody User user) {
        System.out.println(user);
    }

    @PostMapping("repairs")
    public void repairs(@RequestBody Object user) {
        System.out.println(user);
    }

    @PostMapping("batchExportExcel")
    public void batchExportExcel(HttpServletResponse response) {
        divisionService.exportExcel(response);
    }
}
